//
//  PlayerProxy.swift
//  ProxyMode
//
//  Created by mac on 2017/10/31.
//  Copyright © 2017年 RRC. All rights reserved.
//

import Foundation

protocol IProxy {
    func count()
}

public class GamePlayerProxy:IGamePlayer, IProxy{
    private var gamePlayer:IGamePlayer
    
    init(gamePlayer:IGamePlayer) {
        self.gamePlayer = gamePlayer
    }
    
    func login(user: String, password: String) {
        self.gamePlayer.login(user: user, password: password)
    }
    
    func killBoss() {
        self.gamePlayer.killBoss()
    }
    
    func upgrade() {
        self.gamePlayer.upgrade()
        self.count()
    }
    
    func count() {
        print("升级总费用是：150元")
    }
    
}
